package com.wontube.smr.client.model.vo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.wontube.client.modle.vo.PagenateInfo;
import com.wontube.client.modle.vo.PagenateSupport;
import com.wontube.smr.client.model.po.TVEpisode;


/**
 * @author yuechao
 *
 */
public final class EpisodeItems implements Serializable {
	private static final long serialVersionUID = 3218587541143469163L;
	
	private PagenateSupport pagenate = new PagenateSupport();
	private List<TVEpisode> items = new ArrayList<TVEpisode>();	
	
	public EpisodeItems(){}
	
	public EpisodeItems(PagenateInfo pageInfo) {		
		if(pageInfo != null){
			if(pageInfo.getPageSize() > PagenateSupport.maxPageSize){
				pageInfo.setPageSize(PagenateSupport.maxPageSize);
			}
			pagenate.setPagenateInfo(pageInfo);
		}
	}
	
	public PagenateSupport getPagenate() {
		return this.pagenate;
	}
	
	public void setPagenate(PagenateSupport value) {
		this.pagenate = value;
	}
	
	public List<TVEpisode> getItems() {
		return this.items;
	}
	
	public void setItems(List<TVEpisode> items) {
		this.items = items;
	}
	
	public int getPageNo(){
		return pagenate.getPageNo();
	}	
	public int getPageCount(){
		return pagenate.getPageCount();
	}
	public int getTotalCount(){
		return pagenate.getTotalCount();
	}
	public void setTotalCount(int total){
		pagenate.setTotalCount(total);
	}
}
